Template best practices#123
Merged
openshift-merge-bot[bot] merged 4 commits intoOct 17, 2025
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
By applying some best practices from the template MCP server implementation, this PR aims to modernize assisted-service-mcp to have modular and maintainable codebase with centralized configuration and clean, human-readable tool documentation. It preserves full backward compatibility while hopefully improving developer productivity and reliability.
Commit 1 — Source organization and modular architecture
server.pyinto a modular structure (server.pygets completely retired only in commit 3):assisted_service_mcp/src/main.py: entrypoint; metrics setup; server startassisted_service_mcp/src/api.py: FastAPI transport selection (SSE/streamable-http)assisted_service_mcp/src/mcp.py: MCP server initialization; tool registration; wrapper injectionassisted_service_mcp/src/tools/: domain-oriented tool modulesassisted_service_mcp/utils/: utilities (auth.py,helpers.py,client_factory.py)server.pyas a thin wrapper for backward test compatibility.Commit 2 — Centralized configuration (pydantic-settings) and tool description cleanup
assisted_service_mcp/src/settings.pyusingpydantic-settings+python-dotenvField(description=...)metadata; eliminated redundant Args sectionsCommit 3 — Testing, coverage, and package relocation, and everything else
metrics,static_net, andservice_clientunderassisted_service_mcp/src/client_factory.py)All tests are green, server boots cleanly, tools are registered, and client-facing behavior remains unchanged.
Summary by CodeRabbit
New Features
Documentation
Refactor
Tests
Chores